<template>
  <div class="tabs">
    <el-tabs type="border-card" @tab-change="tabsFn">
      <el-tab-pane label="发货">
        <qualityAdd ref="qualityAddRef"></qualityAdd>
      </el-tab-pane>
      <el-tab-pane label="发货表格">
        <qualityAdd2 ref="qualityAdd2Ref"></qualityAdd2>
      </el-tab-pane>
      <el-tab-pane label="发货管理">
        <deliver ref="deliverRef"></deliver>
      </el-tab-pane>
      <el-tab-pane label="质保审核">
        <qualityMan ref="qualityManRef"></qualityMan>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script setup>
import qualityAdd from './components/qualityAdd.vue'
import qualityAdd2 from './components/qualityAdd2.vue'
import deliver from './components/deliver.vue'
import qualityMan from './components/qualityMan.vue'
import { ref } from 'vue'
let qualityAddRef = ref(null)
let deliverRef = ref(null)
let qualityManRef = ref(null)
const tabsFn = (number) => {
  if (number == 0) {
    qualityAdd.value.getData()
  } else if (number == 1) {
    qualityAdd2Ref.value.getData()
  } else if (number == 2) {
    deliverRef.value.getData()
  } else {
    qualityManRef.value.getData()
  }

}
</script>

<style lang="scss" scoped>
.tabs {
  width: 100%;
}
</style>